/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * TrainingBook
 * Copyright (C) Arnaud Duval 2010 <arnaud.duval@gmail.com>
 * 
 * Projects is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Projects is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _ACTIVITY_HISTORY_HPP_
#define _ACTIVITY_HISTORY_HPP_

//#include <lap-history.hpp>
#include <RichTrackPoint.hpp>
#include <libxml++/libxml++.h>
#include <list>

///@class ActivityHistory
///@brief Defines the container for the data recorded during an activity
class ActivityHistory
{
    public:
        ///@brief Default constructor
        ActivityHistory();
        ///@brief Copy constructor
        ActivityHistory(const ActivityHistory&);
        ///@brief Destructor
        ~ActivityHistory();
        ///@brief Overoad of = operator
        ActivityHistory& operator=(const ActivityHistory&);
        ///@brief Read history from a XML node in a TCX file
        void ReadFromTcxFile(xmlpp::Node*, std::string);
        ///@brief Write a file containing the history
        bool WriteHistoryFile(std::string, std::string);
        ///@brief Read a file containing the history
        bool ReadHistoryFile(std::string, std::string);
        ///@brief Return a list of datetime for each recording
        std::list<DateTime> GetDateTimeList();
        ///@brief Compute the average power
        double ComputeAveragePower();
        ///@brief Return the number of laps
        unsigned int GetNumberOfLaps();
        /*///@brief Return a given lap history
        LapHistory GetLapHistory(unsigned int);*/
        
    private:
        /// @todo activity history must contain a single vector with full history and a list of segments
        //std::vector<LapHistory> laps;
        ///@brief Array of record points
        std::vector<RichTrackPoint> trackPoints;

};

#endif